package router

import (
	"k8s-admin/controller/kubernetes"
	"k8s-admin/middleware"

	"github.com/gin-gonic/gin"
)

func Namespace(r *gin.Engine) {
	ns := r.Group("namespace/:cid")
	ns.Use(middleware.K8sCache(), middleware.ChecKToken(), middleware.CasbinMiddle())

	{
		ns.GET("getClusterNamespaceLists", kubernetes.GetClusterNamespaceLists)
		ns.POST("createClusterNamespace", kubernetes.CreateClusterNamespace)
		ns.DELETE("deleteClusterNamespace", kubernetes.DeleteClusterNamespace)
	}
}
